{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}
{% import "_macros.html" as macros %}

{% block title %}万屏时代OPC--微信模板列表{% endblock %}

{% block panel_heading %}
  万屏时代OPC--微信模板列表
    <div class="pull-right btn-group">
        <a href="{{ url_for('opc_wechat_bp.wechat_template_add') }}" class="btn btn-xs btn-success" style="margin-right: 5px;">
            新增模板
        </a>
    </div>
{% endblock %}

{% block panel_body %}

    {% if pagination %}
    <div class="pagination">
        {{ macros.pagination_widget(pagination, 'opc_wechat_bp.wechat_template_list') }}
    </div>
    {% endif %}

    <table id="wechat_template_table" class="table table-bordered table-hover table-condensed table-striped">
        <thead>
            <tr>
                <th>ID</th>
                <th>模板名称</th>
                <th>模板代码</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {% for template in wechat_templates %}
            <tr>
                <td>{{ template.id }}</td>
                <td>{{ template.name }}</td>
                <td>{{ template.code }}</td>
                <td>
                    <a href="{{ url_for('opc_wechat_bp.wechat_template_edit', template_id=template.id) }}" class="btn btn-success">
                      编辑
                    </a>
                </td>
            </tr>
            {% endfor %}
        </tbody>
    </table>

    {% if pagination %}
    <div class="pagination">
        {{ macros.pagination_widget(pagination, 'opc_wechat_bp.wechat_template_list') }}
    </div>
    {% endif %}
{% endblock %}

